fix: Refactor ESI login signal to dict and add portrait diagnostics#10
Merged
mogglemoss merged 1 commit intomasterfrom Mar 1, 2026
Merged
Conversation
The original login signal passed (bool, str) but needed to carry char_id as well for portrait loading. PySide6's cross-thread signal delivery was occasionally mangling positional arguments, causing char_id to be missing or misread, which prevented the character portrait from updating after EVE SSO. Changes: - Changed login_response signal from Signal(bool, str) to Signal(dict) so all login data (is_ok, char_name, char_id) travels together atomically, eliminating argument-shift bugs from threaded signal delivery - Updated ESI.handle_login to pass a typed dict with explicit int() and str() casts for CharacterID and CharacterName from the ESI verify response - Updated ESIProcessor._login_callback and login_handler slot accordingly - Added diagnostic logging to _load_portrait and _on_portrait_loaded to trace char_id, URL, response size, and image decode success so we can identify exactly where portrait loading fails on macOS - Added emoji status indicators to source menu entries in gui_source_toggles - Replaced QDialogButtonBox with explicit Save/Close buttons in gui_sources to fix the Save button not working as expected in the sources dialog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
login_responsesignal fromSignal(bool, str)→Signal(dict)sois_ok,char_name, andchar_idall travel together in a single atomic payload_load_portraitand_on_portrait_loadedto trace portrait load failures on macOSQDialogButtonBoxwith explicit Save/Close buttons in the sources dialogContext
After EVE SSO auth, the character name was updating correctly but the portrait was not swapping to the authenticated character's image. The root cause was that the original login signal carried
(bool, str)— there was no clean path to deliverchar_idto the portrait loader. A workaround had been added to handle "argument shifting" from PySide6's cross-thread signal delivery, but it was fragile.Approach
Changed the signal to carry a
dictpayload instead of positional args. This eliminates the argument-shift problem entirely — all login data arrives together regardless of how PySide6 queues the cross-thread delivery. Thechar_idis now explicitly cast tointat the ESI layer before packing into the dict.The portrait diagnostic logging will surface exactly where the failure is (wrong char_id, network error, or image decode failure) so we can follow up with a targeted fix.
Test plan
🤖 Generated with Claude Code